import {adminUrl} from "@/utils/baseUrl.js"
import request from '@/utils/request'

// 创建楼栋管理
export function createAccommodationBuilding(data) {
  return request({
    url: adminUrl + '/collegebase/accommodation-building/create',
    method: 'post',
    data: data
  })
}

// 更新楼栋管理
export function updateAccommodationBuilding(data) {
  return request({
    url: adminUrl + '/collegebase/accommodation-building/update',
    method: 'put',
    data: data
  })
}

// 删除楼栋管理
export function deleteAccommodationBuilding(id) {
  return request({
    url: adminUrl + '/collegebase/accommodation-building/delete?id=' + id,
    method: 'delete'
  })
}

// 获得楼栋管理
export function getAccommodationBuilding(id) {
  return request({
    url: adminUrl + '/collegebase/accommodation-building/get?id=' + id,
    method: 'get'
  })
}

// 获得楼栋管理分页
export function getAccommodationBuildingPage(query) {
  return request({
    url: adminUrl + '/collegebase/accommodation-building/page',
    method: 'get',
    params: query
  })
}

// 导出楼栋管理 Excel
export function exportAccommodationBuildingExcel(query) {
  return request({
    url: adminUrl + '/collegebase/accommodation-building/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
